package com.appkubes.fintech.restful.application.risk.data.xingpan.controller;

import com.appkubes.fintech.common.response.Response;
import com.appkubes.fintech.restful.application.risk.data.xingpan.service.XingPangRiskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: leeming
 * @Date: 2020-01-22 17:21
 * @Description: 星盘信用数据 通话记录和通话报告，通过星盘爬虫数据获取。
 */
@RestController
@Api(tags = "星盘运营商数据")
@RequestMapping("risk/xingpang")
public class XingPangController {

    @Resource
    private XingPangRiskService xingPangRiskService;

    @ApiOperation("爬取数据")
    @GetMapping("/crawlerData")
    public Response crawlerData(String userKey,String pass) {
        return xingPangRiskService.crawlerData(userKey,pass);
    }

    @ApiOperation("填写验证码")
    @GetMapping("/appendData")
    public Response appendData(String userKey,String name,String code,String crawlerId ,String crawlerToken) {
        return xingPangRiskService.appendData(userKey,name,code,crawlerId,crawlerToken);
    }

    @ApiOperation("获取爬虫数据")
    @GetMapping("/getCrawlerData")
    public Response getCrawlerData(String userKey,String crawlerId ,String crawlerToken) {
        return xingPangRiskService.getCrawlerData(userKey,crawlerId,crawlerToken);
    }
}
